home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #5 / Amiga Plus CD - 2000 - No. 5.iso / Tools / Dev / fpc / amigaunits / conunit.pas < prev    next >
Pascal/Delphi Source File  |  2000-01-01  |  3KB  |  107 lines

  1. {
  2.     This file is part of the Free Pascal run time library.
  3.  
  4.     A file in Amiga system run time library.
  5.     Copyright (c) 1998-2000 by Nils Sjoholm
  6.     member of the Amiga RTL development team.
  7.  
  8.     See the file COPYING.FPC, included in this distribution,
  9.     for details about the copyright.
  10.  
  11.     This program is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14.  
  15.  **********************************************************************}
  16.  
  17. unit conunit;
  18.  
  19. INTERFACE
  20.  
  21. uses exec, console, keymap, inputevent;
  22.  
  23. const
  24. { ---- console unit numbers for OpenDevice() }
  25.  CONU_LIBRARY   = -1;      { no unit, just fill in IO_DEVICE field }
  26.  CONU_STANDARD  = 0;       { standard unmapped console }
  27.  
  28. { ---- New unit numbers for OpenDevice() - (V36) }
  29.  
  30.  CONU_CHARMAP   = 1;       { bind character map to console }
  31.  CONU_SNIPMAP   = 3;       { bind character map w/ snip to console }
  32.  
  33. { ---- New flag defines for OpenDevice() - (V37) }
  34.  
  35.  CONFLAG_DEFAULT               =  0;
  36.  CONFLAG_NODRAW_ON_NEWSIZE     =  1;
  37.  
  38.  
  39.     PMB_ASM     = M_LNM + 1;    { internal storage bit for AS flag }
  40.     PMB_AWM     = PMB_ASM + 1;  { internal storage bit for AW flag }
  41.     MAXTABS     = 80;
  42.  
  43.  
  44. type
  45.  
  46.     pConUnit = ^tConUnit;
  47.     tConUnit = record
  48.         cu_MP   : tMsgPort;
  49.         { ---- read only variables }
  50.         cu_Window       : Pointer;      { (WindowPtr) intuition window bound to this unit }
  51.         cu_XCP          : Integer;        { character position }
  52.         cu_YCP          : Integer;
  53.         cu_XMax         : Integer;        { max character position }
  54.         cu_YMax         : Integer;
  55.         cu_XRSize       : Integer;        { character raster size }
  56.         cu_YRSize       : Integer;
  57.         cu_XROrigin     : Integer;        { raster origin }
  58.         cu_YROrigin     : Integer;
  59.         cu_XRExtant     : Integer;        { raster maxima }
  60.         cu_YRExtant     : Integer;
  61.         cu_XMinShrink   : Integer;        { smallest area intact from resize process }
  62.         cu_YMinShrink   : Integer;
  63.         cu_XCCP         : Integer;        { cursor position }
  64.         cu_YCCP         : Integer;
  65.  
  66.    { ---- read/write variables (writes must must be protected) }
  67.    { ---- storage for AskKeyMap and SetKeyMap }
  68.  
  69.         cu_KeyMapStruct : tKeyMap;
  70.  
  71.    { ---- tab stops }
  72.  
  73.         cu_TabStops     : Array [0..MAXTABS-1] of Word;
  74.                                 { 0 at start, -1 at end of list }
  75.  
  76.    { ---- console rastport attributes }
  77.  
  78.         cu_Mask         : Shortint;
  79.         cu_FgPen        : Shortint;
  80.         cu_BgPen        : Shortint;
  81.         cu_AOLPen       : Shortint;
  82.         cu_DrawMode     : Shortint;
  83.         cu_AreaPtSz     : Shortint;
  84.         cu_AreaPtrn     : Pointer;      { cursor area pattern }
  85.         cu_Minterms     : Array [0..7] of Byte; { console minterms }
  86.         cu_Font         : Pointer;      { (TextFontPtr) }
  87.         cu_AlgoStyle    : Byte;
  88.         cu_TxFlags      : Byte;
  89.         cu_TxHeight     : Word;
  90.         cu_TxWidth      : Word;
  91.         cu_TxBaseline   : Word;
  92.         cu_TxSpacing    : Word;
  93.  
  94.    { ---- console MODES and RAW EVENTS switches }
  95.  
  96.         cu_Modes        : Array [0..(PMB_AWM+7) div 8 - 1] of Byte;
  97.                                 { one bit per mode }
  98.         cu_RawEvents    : Array [0..(IECLASS_MAX+7) div 8 - 1] of Byte;
  99.     end;
  100.  
  101. IMPLEMENTATION
  102.  
  103. end.
  104.  
  105.  
  106.  
  107.